Hi all!
Does anyone have any in-game onscreen "current date/clock scripts"?
If it's possible?
Server side or client side...
I recall the great Elgan making one back in the day I think?
Cheers!
Hi all!
Does anyone have any in-game onscreen "current date/clock scripts"?
If it's possible?
Server side or client side...
I recall the great Elgan making one back in the day I think?
Cheers!
Last edited by OhGaz; May 15th, 2015 at 04:20 AM.
Any pro scripter could do it
#include <time.h> #include <ctime> void timeStamp() { // current date/time based on current system time_t now = time(0); // convert now to string form char* dt = ctime(&now); println dt } level waittill spawn main: while(1) { timeStamp(); waitframe } end
Thank you both for the advice.
James, forgive my ignorance, but does that go into a relevant map's scr file...if so where?
A little bit at odds as to how to get that working on the server - tried playing with it to no avail.
Apologies - still learning.
Cheers and thanks.
Actually, I was being partially funny, because my syntax is half c++ and half moh scripting. :P
Would be bad ass, if MOHAA actually understood the language like that, but unfortunately that's not the case.
I'm not quite sure what functions actually control time in MOHAA, but I'm sure it's in the Documentation somewhere. I'll revisit your request if I get more information.
main: while(1) { local.time = gettime(0) huddraw_align 15 right top huddraw_rect 15 -125 75 0 0 huddraw_font 15 "facfont-20" huddraw_alpha 15 1 huddraw_color 15 1 1 1 huddraw_string 15 local.time wait 1 } end
pffff james , the new coloring is bullshit for mohaa :L
and ctrl+f5 doesn't work for chrome O.o
Wow. Awesome! Works a treat. Thanks muchly, Ryback. 2 questions:
1. How would one go about removing the "seconds" counting from that? And
2. How would one go about "date"? Say for example: dd/mm/yy. I'm thinking something like local.date?
Cheers and thanks again.
Last edited by OhGaz; May 16th, 2015 at 03:43 AM.